package com.rico.deploy.service.impl;

import com.rico.deploy.entity.Week;
import com.rico.deploy.mapper.WeekMapper;
import com.rico.deploy.service.WeekService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author 夏智力
 * @FileName WeekServiceImpl
 * @date 2021/5/2 15:53
 * @Software: IntelliJ IDEA
 */
@Service
public class WeekServiceImpl implements WeekService {
    @Autowired
    private WeekMapper weekMapper;

    @Override
    public List<Week> selectAll() {
        return weekMapper.selectAll();
    }

    @Override
    public Week selectById(Integer id) {
        return weekMapper.selectByPrimaryKey(id);
    }

    @Override
    public int insertWeek(Week week) {
        return weekMapper.insert(week);
    }

    @Override
    public int deleteWeekById(Integer id) {
        return weekMapper.deleteByPrimaryKey(id);
    }

    @Override
    public int updateWeek(Week week) {
        return weekMapper.updateByPrimaryKey(week);
    }
}
